package com.gla.Controller;

import com.gla.result.Result;
import com.gla.service.VipService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@CrossOrigin
@RestController
@RequestMapping("/vip")
public class VipController {

    @Resource
    VipService vipService;

    @RequestMapping("/upgrade")
    public Result upgrade(@RequestParam Integer user_id){
        vipService.upgrade(user_id);
        return Result.succeed("升级成功");
    }

}
